package edu.psu.geovista.app.dataloader.v1.xml;

import edu.psu.geovista.app.dataloader.v1.config.model.Project;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.List;

/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License
 *
 *
 * @Original Author: jin Chen
 * @date: Apr 17, 2005$
 * @version: 1.0
 */

public interface PathsXMLFileSystem {
    boolean DEBUG=false;
    public void load();
    //add a project, if it exists, simply update it
    void setProject(Project proj);
    //save entire document
    void save() throws FileNotFoundException;

    //public static String[] getSortedProjectIDs(List projectList) {
         //return CollectionUtils.convertToStringArray(this.)
        /*int len=projectList.size();
        if(len<=0) return new String[0];
        String[] ids=new String[len];
        for (int i=0;i<len ;i++){
            ProjectType project=(ProjectType) projectList.get(i);
            ids[i]=project.getID();
        }
        return ids;*/

        //wrong:return CollectionUtils.convertToStringArray(this.getSortProjectList());
    //}

    List getSortedProjectIDs();

    //void setProjectIDs(String[] ids );

    Project getProjectByID(String id);

    Project getProjectByIDIngoreCase(String id);

    List getSortProjectList();
    public void setFile(File file);
}
